package com.tyj.movie.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * <p>
 *     用户
 * </p>
 *
 * @author tyj
 * @since 2021-06-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 用户名
     */
    @NotBlank(message = "不能为空")
    @Size(min = 6,max = 15,message = "账号最小6位 最大15位")
    private String username;

    /**
     * 密码
     */
    @NotBlank(message = "不能为空")
    @Size(min = 6,max = 15,message = "密码最小6位 最大15位")
    private String password;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 头像地址
     */
    private String headImgUrl;

    /**
     * 创建日期
     */
    private Date createDate;

    /**
     *  城市id
     */
    @TableField(exist = false)
    private Integer cityId;



}
